package cn.lg.soar.boot.fc.service;

import cn.lg.soar.common.model.HttpResult;
import cn.lg.soar.database.base.service.IBaseService;
import cn.lg.soar.boot.fc.entity.TenancyRoom;
import com.itextpdf.text.DocumentException;
import org.springframework.transaction.annotation.Transactional;

import java.io.IOException;

/**
 * 租房表
 * @author ZhuanZ（无密码）
 * @since 2025-01-18
 * 开源项目：https://gitee.com/lgx1992/lg-soar 求star！请给我star！请帮我点个star！
 */
public interface TenancyRoomService extends IBaseService<TenancyRoom> {

    /**
     * 用户申请租房
     */
    public HttpResult<Void> applyRoom(Long customFormId, Long roomId, Long leaseId,Long formApplyId);

    /**
     * 合同签约
     */
    @Transactional
    public HttpResult<Void> contractSign(Long id);

    /**
     * 租房到期
     */
    @Transactional
    public HttpResult<Void> mature(Long id);

    /**
     * 续租申请
     */
    @Transactional
    public HttpResult<Void> continueApply(Long tenancyId);

    /**
     * 续租审核
     */
    @Transactional
    public HttpResult<Void> continueExamine(Long id,Integer continueState);

    /**
     * 退租
     */
    @Transactional
    public HttpResult<Void> exitTenancy(Long id);

    /**
     * 退租申请
     */
    @Transactional
    public HttpResult<Void> exitTenancyApply(Long tenancyId);

    /**
     * 转租申请
     */
    @Transactional
    public HttpResult<Void> subletApply(Long id,String account);

    /**
     * 转租
     */
    @Transactional
    public HttpResult<Void> sublet(Long id);

    TenancyRoom getData(Long id);
}
